			<div id="main">
				<div id="main_content">
					<div class="tabs">
						<ul>
							<li><a href="#tabs_db_tables">Database Tables</a></li>
							<li><a href="#tabs_update_db">Update DB</a></li>
							<li><a href="#tabs_rebuild_menu">Rebuild Menu</a></li>
						</ul>
						<div id="tabs_db_tables">
							<? if(isset($tables) && count($tables)): ?>
								<ul>
									<? foreach($tables as $table_name => $table_data_array): ?>
										<li><?= $table_name ?>:
											<? if($table_data_array['table_exists']): ?>
												Table present
												<? if($table_data_array['table_up_to_date']): ?>
													and accounted for.&nbsp;
													<img src="/images/admin/icons/accept.png" alt="okay" />
												<? else: ?>
													but out of date. Run Update DB to fix.&nbsp;
													<img src="/images/admin/icons/stop.png" alt="error" />
												<? endif; ?>
											<? else: ?>
												Table missing... run Update DB to fix.&nbsp;
												<img src="/images/admin/icons/stop.png" alt="error" />
											<? endif; ?>
										</li>
									<? endforeach; ?>
								</ul>
							<? endif; ?>
						</div>
						<div id="tabs_update_db">
							<form action="/admin/database/" method="post">
								<input type="hidden" name="action" value="update_db" />
								<input type="submit" name="submit" value="Update DB" />
							</form>
						</div>
						<div id="tabs_rebuild_menu">
							<form action="/admin/ajax_rebuild_menu/" method="post" class="ajax">
								<input type="hidden" name="action" value="rebuild_menu" />
								<input type="submit" name="submit" value="Rebuild Menu" />
							</form>
						</div>
					</div>
					<div id="ajax_response"></div>
					
					<div class="br"></div>
				</div>
				
				<div class="br"></div>
			</div>
			
			<div id="side">
				<h2>Model List</h2>
				<ul>
				<? foreach($fields as $class => $dbfield): ?>
					<li><?= $class ?>
						<ul>
							<? if(isset($dbfield) && count($dbfield)): ?>
								<? foreach($dbfield as $field_name => $field): ?>
									<li>
										<?= $field_name ?>
										(
										<? if(is_object($field) && method_exists($field, 'get_type')): ?>
											<?= $field->get_type() ?>
										<? else: ?>
											Error! Unknown field type.
										<? endif; ?>
										)
									</li>
								<? endforeach; ?>
							<? endif; ?>
						</ul>
					</li>
				<? endforeach; ?>
				</ul>
				<? //print_r($fields); ?>
				<div class="br"></div>
			</div>
